package com.hdey.controller;

import com.hdey.pojo.heng.TbUscPermission;
import com.hdey.service.heng.TbUscPermissionService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@Controller
public class HomeController {
    @Resource
    private TbUscPermissionService permissionService;

    @GetMapping("/home")
    public String index(Model model){
        Map<TbUscPermission, List<TbUscPermission>> menuMap=permissionService.searchMenuList();
        model.addAttribute("menuMap",menuMap);
        return "home";
    }

    @GetMapping("/welcome")
    public String welcome(){
        return "welcome";
    }

    @GetMapping("/login")
    public String login(){
        return "enter";
    }



}
